import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import { Example01Component } from './pages/ch01/example01/example01.component'
import { Ex0201Component } from './pages/ch02/ex0201/ex0201.component'
import { Ex0202Component } from './pages/ch02/ex0202/ex0202.component'
import { Ex0301Component } from './pages/ch03/ex0301/ex0301.component'
import { Ex0302Component } from './pages/ch03/ex0302/ex0302.component'
import { Ex0303Component } from './pages/ch03/ex0303/ex0303.component'
import { Ex0304Component } from './pages/ch03/ex0304/ex0304.component'
import { Ex0305Component } from './pages/ch03/ex0305/ex0305.component'
import { Ex0401Component } from './pages/ch04/ex0401/ex0401.component'
import { Ex0501Component } from './pages/ch05/ex0501/ex0501.component'
import { Ex0601Component } from './pages/ch06/ex0601/ex0601.component'
import { Ex0602Component } from './pages/ch06/ex0602/ex0602.component'

const routes: Routes = [{
  path: 'ch01',
  children: [{
    path: 'example01',
    component: Example01Component,
  }]
}, {
  path: 'ch02',
  children: [{
    path: 'example01',
    component: Ex0201Component,
  }, {
    path: 'example02',
    component: Ex0202Component,
  }]
}, {
  path: 'ch03',
  children: [{
    path: 'example01',
    component: Ex0301Component
  }, {
    path: 'example02',
    component: Ex0302Component
  }, {
    path: 'example03',
    component: Ex0303Component
  }, {
    path: 'example04',
    component: Ex0304Component
  }, {
    path: 'example05',
    component: Ex0305Component
  }]
}, {
  path: 'ch04',
  children: [{
    path: 'example01',
    component: Ex0401Component
  }]
}, {
  path: 'ch05',
  children: [{
    path: 'example01',
    component: Ex0501Component,
  }]
}, {
  path: 'ch06',
  children: [{
    path: 'example01',
    component: Ex0601Component,
  }, {
    path: 'example02',
    component: Ex0602Component,
  }]
}]

@NgModule({
  imports: [RouterModule.forRoot(routes, {useHash: true})],
  exports: [RouterModule]
})
export class AppRoutingModule {
}
